package com.mk.controller.admin;

import com.mk.dto.PageDTO;
import com.mk.entity.Pet;
import com.mk.query.PetQuery;
import com.mk.result.Result;
import com.mk.service.IPetService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 客户端宠物业务
 */
@RestController("adminPetController")
@RequestMapping("/admin/pet")
@RequiredArgsConstructor
public class PetController {

    private final IPetService petService;

    @CrossOrigin
    @GetMapping("/page")
    public PageDTO<Pet> list(PetQuery query) {
        return petService.queryPetsPage(query);
    }

}
